import $http from '../utils/api'
// 登录
export const login=(code:string | undefined)=>{

 return $http.get(`/user/login?code=${code}`)

}
// 签到
 interface dao {
    date: string,
    info: string,
  }
export const qiandao =(params:dao[])=>{

    return $http.post('/tian/dao',params)
}

// 获取签到数据
export const qiandaoData =()=>{

  return $http.get('/tian/getDao')
}
// 获取科目数据
export const getKemu =()=>{

  return $http.get('/Alissues/get')
}
// 获取轮播数据
export const getKimg =()=>{

  return $http.get('/Alissues/gettupian')
}
// 获取试题数据
export const getKemushiti =(id:any)=>{

  return $http.get(`/Alissues/getdetails?id=${id}`)
}

// 新增讨论数据
export const xiznengtao =(params:any)=>{

  return $http.post(`/lun/jia`,params)
}
// 获取讨论数据
export const getengtao =()=>{

  return $http.get(`/lun/getlun`)
}
// 新增讨论数据
export const xtngtao =(params:any)=>{

  return $http.post(`/lun/tilun`,params)
}
// 获取讨论数据
export const getlunx =(id:any)=>{
  console.log(id);
  

  return $http.get(`/lun/getlunx?id=${id}`)
}